home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.0
/
Video Toaster v4.0.iso
/
arexx
/
cg
/
rexxlauncher.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-03-10
|
1KB
|
49 lines
/* RexxLauncher.rexx -- Launches CG Scripts */
/* By Bob Caron © 1994 NewTek, Inc. */
/* This one just took HOURS to code */
call addlib(CG_AREXX,0)
filnam = 'ENV:RLauncher.state'
version = 'RexxLauncher v1.4'
if (exists(filnam)) then do
if (~open(state, filnam, 'R')) then break
if (readln(state) ~= version) then break
file=readln(state)
end
call close state
if file~="" | file="FILE" then do
if lastpos('/',file,length(file)-1)~=0 then do
filenam=right(file,(length(file)-lastpos('/',file,length(file)-1)))
path=left(file,(lastpos('/',file,length(file))-1))
end
else do
filenam=right(file,(length(file)-lastpos(':',file,length(file)-1)))
path=left(file,(lastpos(':',file,length(file))))
end
end
if file="FILE" | file="" then do
path="Rexx:CG"
filenam=""
end
script=REQ_FILE("Run Arexx Program",filenam,path)
file=script
if (open(state, filnam, 'W')) then do
call writeln state, version
call writeln state, file
call close state
end
if exists(script)=0 then do
call REQ_TELL("Macro not found.")
exit
end
REXX(script)
exit